/****** Object:  Stored Procedure [dbo].spproductGetList Script Date: 11/24/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spproductGetByCategoryId]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spproductGetByCategoryId]
GO

CREATE PROCEDURE [dbo].[spproductGetByCategoryId]
(
	@CatogeryID int
)
WITH ENCRYPTION
AS

SELECT
	*
FROM
	[tbl_product] as p INNER JOIN [tbl_catogery_product] as cp on p.ProductID = cp.ProductID
Where cp.CatogeryID = @CatogeryID

GO

--GRANT EXECUTE ON [dbo].[spproductGetList] TO [sa]
--GO
